package com.cssiot.weixin.basic.data;

/**
 *文本 消息（接收或回复）
 * @author jacking
 * 1、接收时：
 * 
 <xml>
 <ToUserName><![CDATA[toUser]]></ToUserName>
 <FromUserName><![CDATA[fromUser]]></FromUserName>
 <CreateTime>1348831860</CreateTime>
 <MsgType><![CDATA[text]]></MsgType>
 <Content><![CDATA[this is a test]]></Content>
 
 <MsgId>1234567890123456</MsgId>
 
 </xml>
 *2、回复时：
 <xml>
<ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>12345678</CreateTime>
<MsgType><![CDATA[text]]></MsgType>
<Content><![CDATA[你好]]></Content>
</xml>

 开通语音识别后
 <Recognition><![CDATA[腾讯微信团队]]></Recognition>
 */
public  class TextMessage extends MessageParent{
	/**
	 * 消息内容（换行：在content中能够换行，微信客户端就支持换行显示）
	 */
	public String Content;
	/**
	 * 接收时才会有消息id，64位整型
	 */
	public String MsgId;
	/**
	 *  开通语音识别后 才增加字段
	 */
	public String Recognition;
	
	/**
	 * 是否回复(平台接收有MsgId,回复没有)
	 */
	public boolean isReply;

	public String getContent() {
		return Content;
	}

	public void setContent(String content) {
		Content = content;
	}
	
	/**
	 * 获取文本消息对象
	 * 是否为回复 
	 * @param isReply
	 * @return
	 */
	public static TextMessage getTextMessage(boolean isReply){
		TextMessage tm=new TextMessage();
		if(isReply){
			tm.isReply=true;
		}
		return tm;
	}

	public String getMsgId() {
		return MsgId;
	}

	public void setMsgId(String msgId) {
		MsgId = msgId;
	}

	public boolean isReply() {
		return isReply;
	}

	public void setReply(boolean isReply) {
		this.isReply = isReply;
	}

	public String getRecognition() {
		return Recognition;
	}

	public void setRecognition(String recognition) {
		Recognition = recognition;
	}
	
 

}
